/*
 * 系统项目名称：综合决策分析系统
 * 文件名：DataAnaDaoImpl.java
 * 描述：
 * 版权：Copyright 2015-2020 义乌市跨境电商供应链管理有限公司-版权所有
 * 修改人：yiwangtong
 * 修改时间：2015年10月12日 下午6:02:32
 * 版本号：V1.1
 */
package com.ywt.cda.dao.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Component;

import com.ywt.cda.core.dao.page.Page;
import com.ywt.cda.dao.Ana2ndDataDao;
import com.ywt.cda.domain.Ana2ndData;

/**
 * 分析数据数据访问层接口实现类
 * <br>（功能详细描述）
 * @author yiwangtong
 * @version V1.0
 * @see [相关类/方法]
 * @since 2015年10月12日 下午6:02:32
 */
@Component("ana2ndDataDao")
public class Ana2ndDataDaoImpl implements Ana2ndDataDao
{
	@Resource(name = "sqlSession")
	private SqlSession sqlSession;
	
	/* (non-Javadoc)
	 * @see com.ywt.dcs.dao.DataAnaDao#list(java.util.Map)
	 */
	@Override
	public List<Ana2ndData> list(Map<String, Object> params)
	{
		return sqlSession.selectList("Ana2ndData.list", params);
	}
	
	/* (non-Javadoc)
	 * @see com.ywt.dcs.dao.DataAnaDao#list(java.util.Map)
	 */
	@Override
	public List<Ana2ndData> list(Map<String, Object> params,Page page)
	{
		return sqlSession.selectList("Ana2ndData.list", params,page);
	}

	
	
	
	/* (non-Javadoc)
	 * @see com.ywt.dcs.dao.DataAnaDao#list(java.util.Map)
	 */
	@Override
	public List<Ana2ndData> total(Map<String, Object> params,Page page)
	{
		if(null==page){
			return sqlSession.selectList("Ana2ndData.total", params);
		}
		return sqlSession.selectList("Ana2ndData.total", params,page);
	}

	

	@Override
	public List<Ana2ndData> totalCategory(Map<String, Object> params, Page page) {
		// TODO Auto-generated method stub
		if(page==null){
			return  sqlSession.selectList("Ana2ndData.totalCategory", params);
		}
		return sqlSession.selectList("Ana2ndData.totalCategory", params,page);
	}

	

	@Override
	public List<Ana2ndData> totalByPrice(Map<String, Object> params, Page page) {
		// TODO Auto-generated method stub
		if(null==page){
			return sqlSession.selectList("Ana2ndData.totalByPrice", params);
		}
		return sqlSession.selectList("Ana2ndData.totalByPrice", params,page);
	}

	

	@Override
	public List<Ana2ndData> totalCategoryByNum(Map<String, Object> params,
			Page page) {
		// TODO Auto-generated method stub
		if(null==page){
			return sqlSession.selectList("Ana2ndData.totalCategoryByNum", params);
		}
		return sqlSession.selectList("Ana2ndData.totalCategoryByNum", params,page);
	}

	@Override
	public List<Ana2ndData> listByParams(Map<String, Object> params) {
		return sqlSession.selectList("Ana2ndData.listByParams", params);
	}

	@Override
	public List<Ana2ndData> listTotalDataByParams(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return sqlSession.selectList("Ana2ndData.totalByParamsBack", params);
	}
	@Override
	public List<Ana2ndData> listTotalDataByParamsAndPage(Map<String, Object> params,Page page) {
		// TODO Auto-generated method stub
		return sqlSession.selectList("Ana2ndData.totalByParams", params,page);
	}

	@Override
	public List<Ana2ndData> getMcategoryByDateFlag(Map<String, Object> params){
		return sqlSession.selectList("Ana2ndData.getMcategoryByDateFlag", params);
	}

	@Override
	public List<Ana2ndData> listTotalSku(Map<String, Object> params,Page page) {
		// TODO Auto-generated method stub
		return sqlSession.selectList("Ana2ndData.totalSku", params,page);
	}

	@Override
	public List<Ana2ndData> listOrderBy(Map<String, Object> params, Page page) {
		if(null==page){
			return sqlSession.selectList("Ana2ndData.listOrderBy", params);
		}
		return sqlSession.selectList("Ana2ndData.listOrderBy", params,page);
	}

	@Override
	public List<Ana2ndData> listPort(Map<String, Object> parms) {
		
		return sqlSession.selectList("Ana2ndData.listPort", parms);
	}


	@Override
	public List<String> getItemNameListByKeyword(Map<String, Object> params) {
		return sqlSession.selectList("Ana2ndData.listbyItemName", params);
	}
}
